/*
 * @Author: your name
 * @Date: 2020-07-28 22:37:30
 * @LastEditTime: 2020-07-28 22:49:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \react-hooks-app\src\reducer.js
 */
export const userReducerDemo = (state,action)=>{
  switch (action.type) {
    case 'add':
      return state + 1
    case 'inc':
      return state - 1
    case 'init' :
      return state = action.data
    default:
      break;
  }
}

